package io.kiki.sba.registry.common.model.dataserver;


import io.kiki.sba.registry.common.model.ClientInterfaceId;
import lombok.Getter;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * request to get versions of specific data
 */
@Getter
public class GetDataVersionRequest extends AbstractSlotRequest {

    private static final long serialVersionUID = 1L;

    private final String dataCenter;
    // dataInfoId:max(push.version)
    private final Map<String, DatumVersion> dataInfoIdToDatumVersionMap;

    public GetDataVersionRequest(String dataCenter, ClientInterfaceId clientInterfaceId, int slotId, Map<String, DatumVersion> dataInfoIdToDatumVersionMap) {
        super(slotId, clientInterfaceId);
        this.dataCenter = dataCenter;
        this.dataInfoIdToDatumVersionMap = Collections.unmodifiableMap(new HashMap<>(dataInfoIdToDatumVersionMap));
    }


}
